import request from '@/utils/request'

export const addCatr = (goodsId, goodsNum, goodsSkuId) => {
  return request.post('/cart/add', {
    goodsId, // 商品ID(苹果手机)
    goodsNum, // 商品数量
    goodsSkuId// 商品SKUID(红色的苹果手机)
  })
}

// 购物车商品列表
export const getCartList = () => {
  return request.get('/cart/list')
}

// 购物车商品更新
export const changeCount = (goodsId, goodsNum, goodsSkuId) => {
  return request.post('/cart/update ', {
    goodsId,
    goodsNum,
    goodsSkuId
  })
}
